{% extends "base.html" %}
{% block title %}Chats{% endblock %}
{% block header %}Chats{% endblock %}
{% block content %}
<table class="ui celled table">
    <thead>
        <tr>
            <th>ID</th>
            <th>User 1 ID</th>
            <th>User 2 ID</th>
            <th>Name</th>
            <th>Last Message</th>
            <th>Timestamp</th>
            <th>Is Read</th>
        </tr>
    </thead>
    <tbody>
        {% for chat in chats %}
        <tr>
            <td>{{ chat.id }}</td>
            <td>{{ chat.user1_id }}</td>
            <td>{{ chat.user2_id }}</td>
            <td>{{ chat.name }}</td>
            <td>{{ chat.last_message }}</td>
            <td>{{ chat.timestamp }}</td>
            <td>{{ chat.is_read }}</td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}
